33#ifndef __CRONO_SDK_h__
34#define __CRONO_SDK_h__
66#ifdef CRONO_SDK_EXPORTS
67#define CRONO_SDK_API __declspec(dllexport)
69#define CRONO_SDK_API __declspec(dllimport)
81#define MAX_PATTERN_LENGTH 8192
83#define MIN_GATE_OFF 12
87#define MAX_SERIAL_LENGTH 20
89#define MAX_DATETIME_LENGTH 100
650#include "MPD_Utils.h"
CRONO_Return CRONO_SaveSettingsToFile(CRONO_H crono, char *path)
Saves current settings to file.
CRONO_Return CRONO_LoadSettingsFromFile(CRONO_H crono, char *path)
Loads Crono settings from a file.
CRONO_Return CRONO_GetCameraSettings(CRONO_H crono, CRONO_CameraSettings *settings)
Gets actual Crono settings and saves them in a user provided CRONO_CameraSettings struct passed by re...
CRONO_Return CRONO_LoadCameraSettings(CRONO_H crono, CRONO_CameraSettings settings)
Loads Crono settings from a CRONO_CameraSettings struct.
CRONO_Return CRONO_GetSensorType(CRONO_H crono, CRONO_SensorType *sensorType)
Retrieves the sensor type (128x1 or 8x8)
CRONO_Return CRONO_GetActivePixels(CRONO_H crono, int *activePixels)
Gets the number of active pixels currently configured.
CRONO_Return CRONO_ConfigAcquisition(CRONO_H crono, CRONO_PixelMode pixelMode, cronoBool framesEnable, cronoBool histogramsEnable, cronoBool timeTagsEnable, cronoBool liveEnable, cronoBool unused, const char *rawDataOutPath)
configures the acquisition modes and selects the output data formats.
CRONO_Return CRONO_ConfigSensor(CRONO_H crono, int activePixels, cronoBool half1Enable, cronoBool half2Enable, double *maxFrameStartFrequency)
Configures the Crono spad array sensor region of interest, i.e.
CRONO_Return CRONO_SetSpadDeadTime(CRONO_H crono, int deadTimeNs)
Sets the SPADs dead time in ns.
CRONO_Return CRONO_ConfigTriggerExternal(CRONO_H crono, int framesBurstCount)
Sets the camera in external trigger mode.
CRONO_Return CRONO_ConfigAuxiliaryInputs(CRONO_H crono, CRONO_AuxInputMode bitModeA, CRONO_AuxInputMode bitModeB, double bitAThreshold)
Configure aux inputs sampling.
CRONO_Return CRONO_ConfigGateExternal(CRONO_H crono, double threshold, cronoBool externalGateInvert)
Sets the camera in external gate mode and configure the associated parameters.
CRONO_Return CRONO_GetInputFrequencies(CRONO_H crono, double *extStartFrequency, double *extGateFrequency, double *extTriggerFrequency)
Gets the current meaured input signal frequencies at the SMA inputs.
CRONO_Return CRONO_ConfigOutputs(CRONO_H crono, int chan1Selection, int chan2Selection, int chan3Selection)
Configures which Crono signals are forwarded to each of the three output ports.
CRONO_Return CRONO_ConfigFrameStartExternal(CRONO_H crono, double frameRate, double threshold, cronoBool externalStartPosedge, int divFactor)
Sets the camera in external frame start mode and configure the associated parameters.
CRONO_Return CRONO_ConfigLaserSync(CRONO_H crono, int *pattern, int patternLen)
Configures the pattern of internally generated laser syncronization signal.
CRONO_Return CRONO_ConfigGateInternal(CRONO_H crono, int *pattern, int patternLen)
Set the camera in internal gate mode and configures the pattern of internally generated gate.
CRONO_Return CRONO_ConfigTriggerInternal(CRONO_H crono)
Sets the camera in internal trigger mode.
CRONO_Return CRONO_ConfigFrameStartInternal(CRONO_H crono, double frameRate, double *actualBin)
Sets the camera in internal frame start mode and sets the frame start rate.
CRONO_Return CRONO_Destr(CRONO_H crono)
Frees all resources owned by a Crono handle.
CRONO_Return CRONO_Constr(CRONO_H *crono)
Constructs a new Crono object.
CRONO_Return CRONO_GetTimeTagsData(CRONO_H crono, uint64_t *dataBuf, uint64_t capacity, uint64_t *copiedLen)
Gets an acquisition data chuck in time tags format.
CRONO_Return CRONO_StopAcquisition(CRONO_H crono, cronoBool force)
Stops an ongoing acquisition.
CRONO_Return CRONO_GetHistogramData(CRONO_H crono, uint32_t *buf, uint64_t capacityNumHists, uint64_t *copiedNumHists)
Gets an acquisition data chuck in histogram format.
CRONO_Return CRONO_GetAcquisitionStatus(CRONO_H crono, CRONO_AcquisitionStatus *status)
Gets the current acquisition status.
CRONO_Return CRONO_GetLiveData(CRONO_H crono, uint32_t *countsBuf, uint32_t *histogramBuf, cronoBool *dataIsNew)
Gets latest live data whenever available.
CRONO_Return CRONO_GetFramesData(CRONO_H crono, uint32_t *buf, uint64_t capacityNumFrames, uint64_t *copiedNumFrames)
Gets an acquisition data chuck in frames format.
CRONO_Return CRONO_GetAcquisitionInfo(CRONO_H crono, CRONO_AcquisitionInfo *acqInfo)
Gets informations about the last acquisition.
CRONO_Return CRONO_StartAcquisition(CRONO_H crono, uint64_t acqMaxFrames, int integPeriodFrames)
Starts a new acquisition.
#define MAX_PATTERN_LENGTH
Maximum pattern length in ns.
Definition: CRONO_SDK.h:81
#define MAX_SERIAL_LENGTH
Maximum serial number string length.
Definition: CRONO_SDK.h:87
#define MAX_DATETIME_LENGTH
Maximum date and time string length.
Definition: CRONO_SDK.h:89
CRONO_Return CRONO_GetDeviceCount(CRONO_H crono, int *count)
Gets the count of all active and connected Crono devices.
CRONO_Return CRONO_OpenDeviceBySerial(CRONO_H crono, char *serial)
Opens a device with a given serial number.
CRONO_Return CRONO_GetDeviceInfo(CRONO_H crono, char *serial, CRONO_DeviceInfo *deviceInfo)
Gets information about a device with a given serial number, or of the already open device.
CRONO_Return CRONO_GetDeviceSerial(CRONO_H crono, int deviceIndex, char *buf)
Get the serial number of a connected Crono device given its numeric index.
CRONO_Return CRONO_OpenDeviceAsDataConverter(CRONO_H crono, char *rawFilePath)
Open saved Crono raw file as a virtual device for data conversion.
int integPeriodFrames
Number of frames to be integrated for histogram or frame accumulation.
Definition: CRONO_SDK.h:222
uint64_t acquiredFramesCount
Number of acquired frames.
Definition: CRONO_SDK.h:167
int deadTimeNs
SPAD deadtime in ns.
Definition: CRONO_SDK.h:214
int64_t auxBitACount
Count of bit A samples>.
Definition: CRONO_SDK.h:204
int64_t decodedFrameCount
Number of frames decoded by SDK since acquisition start.
Definition: CRONO_SDK.h:196
cronoBool startIsExternal
True if start signal is externally generated.
Definition: CRONO_SDK.h:225
cronoBool ongoing
Boolean value that indicates wether the acquisition is ongoing.
Definition: CRONO_SDK.h:206
int64_t hostAllocatedBytes
Current ram usage for storing acquired and decoded data on the host computer.
Definition: CRONO_SDK.h:199
int SdkMinorVersion
SDK minor version.
Definition: CRONO_SDK.h:157
CRONO_AuxInputMode AuxInputASamplingMode
Aux A (Gate input) sampling mode.
Definition: CRONO_SDK.h:247
int FwMinorVersion
Firmware minor version.
Definition: CRONO_SDK.h:154
int SdkMajorVersion
SDK major version.
Definition: CRONO_SDK.h:156
int64_t availableRawCount
Number of currently buffered raw data values.
Definition: CRONO_SDK.h:200
int64_t deviceRamUsageBytes
Current usage of Crono device RAM expressed in bytes.
Definition: CRONO_SDK.h:197
int SdkPatchVersion
SDK patch version.
Definition: CRONO_SDK.h:158
int activePixels
Number of active pixels.
Definition: CRONO_SDK.h:216
double frameRate
Start frequency (actual if internal, maximum expected if external).
Definition: CRONO_SDK.h:226
int64_t capturedFrameCount
Number of frames captured by the camera since acquisition start.
Definition: CRONO_SDK.h:195
int laserSyncPatternLenght
Number of elements in the gate sync pattern.
Definition: CRONO_SDK.h:238
cronoBool deviceRamFull
Boolean value that indicates wether the Crono device RAM is full.
Definition: CRONO_SDK.h:207
CRONO_SensorType SensorType
Sensor type, 128x1 or 8x8.
Definition: CRONO_SDK.h:151
double externalGateThreshold
Threshold for external gate signal.
Definition: CRONO_SDK.h:232
int chan3Selection
Signal selection for SMA output 3.
Definition: CRONO_SDK.h:242
int64_t availableHistogramCount
Number of currently buffered histograms.
Definition: CRONO_SDK.h:203
int FwPatchVersion
Firmware patch version.
Definition: CRONO_SDK.h:155
cronoBool gateIsExternal
True if gate signal is externally generated.
Definition: CRONO_SDK.h:231
int internalGatePatternLenght
Number of elements in the gate pattern.
Definition: CRONO_SDK.h:235
int64_t downloadedBytes
Number of downloaded bytes on the host computer since acquisition start.
Definition: CRONO_SDK.h:198
int64_t auxBitBCount
Count of bit B samples>.
Definition: CRONO_SDK.h:205
cronoBool half1Enable
True if 1st half of imager is enabled.
Definition: CRONO_SDK.h:217
int externalTriggerBurstCount
Number of frames to be acquired for each trigger pulse.
Definition: CRONO_SDK.h:245
cronoBool acquireOnExtTrigger
True if acquisition is controller by external trigger.
Definition: CRONO_SDK.h:244
int chan1Selection
Signal selection for SMA output 1.
Definition: CRONO_SDK.h:240
cronoBool externalGateInvert
True if external start is inverted.
Definition: CRONO_SDK.h:233
uint64_t acqMaxFrames
Total number of frames to be acquired.
Definition: CRONO_SDK.h:223
double externalStartThreshold
Threshold for external start signal.
Definition: CRONO_SDK.h:227
int chan2Selection
Signal selection for SMA output 2.
Definition: CRONO_SDK.h:241
int externalStartDivisionFactor
Division factor for external start.
Definition: CRONO_SDK.h:229
int64_t availableFramesCount
Number of currently buffered frames.
Definition: CRONO_SDK.h:201
cronoBool externalStartPosedge
True if external start is active on rising edge.
Definition: CRONO_SDK.h:228
int UsbSpeed
Speed grade of the USB connection.
Definition: CRONO_SDK.h:159
int FwMajorVersion
Firmware major version.
Definition: CRONO_SDK.h:153
cronoBool half2Enable
True if 2nd half of imager is enabled.
Definition: CRONO_SDK.h:218
CRONO_AuxInputMode AuxInputBSamplingMode
Aux B (Trigger input) sampling mode.
Definition: CRONO_SDK.h:248
int64_t availableTimeTagsCount
Number of currently buffered time tags values.
Definition: CRONO_SDK.h:202
CRONO_PixelMode countingMode
Camera operation mode.
Definition: CRONO_SDK.h:220
double acquisitionTime
Elapsed time in seconds since acquisition start.
Definition: CRONO_SDK.h:194
struct Crono * CRONO_H
Type CRONO_H.
Definition: CRONO_SDK.h:102
CRONO_AuxInputMode
Crono auxiliary inputs sampling mode enumeration.
Definition: CRONO_SDK.h:183
CRONO_SensorType
Crono sensor types enumeration.
Definition: CRONO_SDK.h:142
CRONO_PixelMode
Crono pixel mode enumeration.
Definition: CRONO_SDK.h:174
CRONO_Return
Error table.
Definition: CRONO_SDK.h:108
uint8_t cronoBool
Type cronoBool.
Definition: CRONO_SDK.h:99
@ RISING_EDGE
Sample the auxiliary input on rising edge.
Definition: CRONO_SDK.h:185
@ BOTH_EDGES
Sample the auxiliary input on both rising and falling edges.
Definition: CRONO_SDK.h:187
@ OFF
Do not sample the auxiliary input.
Definition: CRONO_SDK.h:184
@ FALLING_EDGE
Sample the auxiliary input on falling edge.
Definition: CRONO_SDK.h:186
@ CRONO_8X8
8x8 pixels sensor
Definition: CRONO_SDK.h:143
@ CRONO_128X1
128x1 pixels sensor
Definition: CRONO_SDK.h:144
@ TIMING
Event timing mode.
Definition: CRONO_SDK.h:175
@ COUNTING
Event counting mode.
Definition: CRONO_SDK.h:176
@ DEVICE_NOT_FOUND
No Crono device was found.
Definition: CRONO_SDK.h:110
@ INVALID_LASER_SYNC_LENGHT
Laser sync length out of bound.
Definition: CRONO_SDK.h:125
@ DEVICE_NOT_OPEN
There is no open device.
Definition: CRONO_SDK.h:112
@ PATTERN_TOO_LONG
Pattern too long.
Definition: CRONO_SDK.h:133
@ INVALID_PIXEL_NUMBER
Pixel number out of bound.
Definition: CRONO_SDK.h:118
@ INVALID_DATA_FILE
Data file format is not valid.
Definition: CRONO_SDK.h:115
@ INVALID_THRESHOLD
Threshold out of bound.
Definition: CRONO_SDK.h:127
@ NULL_POINTER
A NULL pointer was passed to the function.
Definition: CRONO_SDK.h:132
@ INVALID_FRAME_BURST_COUNT
Frame burst value out of bound.
Definition: CRONO_SDK.h:123
@ LOGIC_VERSION_FAIL
The version of the camera firmware is not compatible.
Definition: CRONO_SDK.h:111
@ DEVICE_ALREADY_OPEN
There is already an open device.
Definition: CRONO_SDK.h:113
@ INVALID_CONFIG
Configuration is not valid.
Definition: CRONO_SDK.h:126
@ FPGA_FAILED
Camera not responding.
Definition: CRONO_SDK.h:136
@ INVALID_DIVISION_FACTOR
Division factor out of bound.
Definition: CRONO_SDK.h:122
@ INVALID_ENUM
Enum out of bound.
Definition: CRONO_SDK.h:135
@ INVALID_START_RATE
Start rate out of bound.
Definition: CRONO_SDK.h:121
@ FPGA_TIMEOUT
Communication timeout.
Definition: CRONO_SDK.h:137
@ ACQ_ONGOING
Acquisition is ongoing.
Definition: CRONO_SDK.h:129
@ NO_ERR
The function returned successfully.
Definition: CRONO_SDK.h:109
@ ACQ_EXT_TRIG_TIMEOUT
Timeout waiting for external trigger.
Definition: CRONO_SDK.h:130
@ INVALID_DEAD_TIME
Deadtime out of bound.
Definition: CRONO_SDK.h:119
@ INVALID_CHANNEL
Channel out of bound.
Definition: CRONO_SDK.h:134
@ RAM_FULL
Camera RAM is full.
Definition: CRONO_SDK.h:131
@ INVALID_HALVES_CONFIG
Halves configuration is not valid.
Definition: CRONO_SDK.h:120
@ SENSOR_FAILED
Hardware error.
Definition: CRONO_SDK.h:116
@ INVALID_GATE_LENGHT
Gate length out of bound.
Definition: CRONO_SDK.h:124
@ DEVICE_OPEN_AS_CONVERTER
The device is open as data converter.
Definition: CRONO_SDK.h:114
@ POWER_FAILED
Hardware error.
Definition: CRONO_SDK.h:117
@ NO_SUCH_FILE_OR_DIRECTORY
File not found.
Definition: CRONO_SDK.h:128
Struct containing information about the acquisition.
Definition: CRONO_SDK.h:165
Struct containing the status of an ongoing Crono acquisition.
Definition: CRONO_SDK.h:193
Struct containing camera settings.
Definition: CRONO_SDK.h:213
Struct containing information about the version and connection speed grade of a connected Crono devic...
Definition: CRONO_SDK.h:150